import React from "react";
import {Route,Redirect} from "react-router";
import AsyncComponent from "../utils/AsyncComponent";

const Login = AsyncComponent(()=>import(/*webpackChunkName: "Login"*/ "./Login"));
const User = AsyncComponent(()=>import(/*webpackChunkName: "User"*/"./User"));
const Home = AsyncComponent(()=>import(/*webpackChunkName: "Home"*/"./Home"));

export default (
    <>
        <Route exact path="/" render={()=><Redirect to="/home" />} />
        <Route path="/home" component={Home} />
        <Route path="/login" component={Login} />
        <Route path="/user" component={User} />
    </>
);




